home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / octa209s.zip / octave-2.09 / liboctave / statdefs.h < prev    next >
C/C++ Source or Header  |  1996-10-30  |  2KB  |  74 lines

  1. /*
  2.  
  3. Copyright (C) 1996 John W. Eaton
  4.  
  5. This file is part of Octave.
  6.  
  7. Octave is free software; you can redistribute it and/or modify it
  8. under the terms of the GNU General Public License as published by the
  9. Free Software Foundation; either version 2, or (at your option) any
  10. later version.
  11.  
  12. Octave is distributed in the hope that it will be useful, but WITHOUT
  13. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  14. FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  15. for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with Octave; see the file COPYING.  If not, write to the Free
  19. Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  20.  
  21. */
  22.  
  23. #if !defined (octave_statdefs_h)
  24. #define octave_statdefs_h 1
  25.  
  26. #ifdef HAVE_SYS_TYPES_H
  27. #include <sys/types.h>
  28. #endif
  29. #include <sys/stat.h>
  30.  
  31. #ifndef S_ISREG            /* Doesn't have POSIX.1 stat stuff. */
  32. #define mode_t unsigned short
  33. #endif
  34. #if !defined(S_ISBLK) && defined(S_IFBLK)
  35. #define    S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
  36. #endif
  37. #if !defined(S_ISCHR) && defined(S_IFCHR)
  38. #define    S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
  39. #endif
  40. #if !defined(S_ISDIR) && defined(S_IFDIR)
  41. #define    S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
  42. #endif
  43. #if !defined(S_ISREG) && defined(S_IFREG)
  44. #define    S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
  45. #endif
  46. #if !defined(S_ISFIFO) && defined(S_IFIFO)
  47. #define    S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
  48. #endif
  49. #if !defined(S_ISLNK) && defined(S_IFLNK)
  50. #define    S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
  51. #endif
  52. #if !defined(S_ISSOCK) && defined(S_IFSOCK)
  53. #define    S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
  54. #endif
  55. #if !defined(S_ISMPB) && defined(S_IFMPB) /* V7 */
  56. #define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
  57. #define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
  58. #endif
  59. #if !defined(S_ISNWK) && defined(S_IFNWK) /* HP/UX */
  60. #define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
  61. #endif
  62.  
  63. #ifndef S_ISLNK
  64. #define lstat stat
  65. #endif
  66.  
  67. #endif
  68.  
  69. /*
  70. ;;; Local Variables: ***
  71. ;;; mode: C ***
  72. ;;; End: ***
  73. */
  74.